<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<link rel="stylesheet" href="../../styles/index.css">
	<style>
		.box1 {
			width: 200px;
			height: 200px;
			background: skyblue;

			margin-bottom: 50px;
		}

		.box2 {
			width: 100px;
			height: 100px;
			background: pink;
			/* 现象：上下margin会叠加取最大值 */
			/**
			 * 解决方法很多
			 *	1.只给一个元素加margin值，要多少margin值，全给他
			 *  2.给padding值
			 *  3.bfc 格式化上下文
			 *  4.用 flex，grid 布局
			 */
			margin-top: 30px;

		}
	</style>
</head>

<body>
	<div class="container">
		<div class="box box1"></div>
		<div class="box box2"></div>
	</div>
</body>

</html>